import request from '@/utils/request'

// 添加sku
export function saveSku(data) {
  return request({
    url: `/admin/product/saveSkuInfo`,
    method: 'post',
    data
  })
}

// 获取sku列表
export function getSkuList(page, limit) {
  return request({
    url: `/admin/product/list/${page}/${limit}`,
    method: 'get'
  })
}

// 上架
export function onSale(skuId) {
  return request({
    url: `/admin/product/onSale/${skuId}`,
    method: 'get'
  })
}

// 下架
export function cancelSale(skuId) {
  return request({
    url: `/admin/product/cancelSale/${skuId}`,
    method: 'get'
  })
}
